package com.dlc.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 消息记录表
 * @author lhd
 * @date 2020-07-01 15:44:27
 */
@Data
@TableName("tz_notify_log")
public class NotifyLog implements Serializable{
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    @Schema(description = "消息记录表Id" )
    private Long logId;

    @Schema(description = "用户昵称" )
    private String nickName;

    @Schema(description = "通知的用户id" )
    private String remindId;

    @Schema(description = "店铺id" )
    private Long shopId;

    @TableField(exist = false)
    @Schema(description = "店铺名称" )
    private String shopName;

    @Schema(description = "通知类型 1.短信发送 2.公众号订阅消息 3.站内消息" )
    private Integer remindType;

    @Schema(description = "通知短信类型" )
    private Integer sendType;

    @Schema(description = "用户手机号" )
    private String userMobile;

    @Schema(description = "通知模板id" )
    private Long templateId;

    @Schema(description = "通知内容" )
    private String message;

    @Schema(description = "是否阅读 1已读 0未读" )
    private Integer status;

    @Schema(description = "记录时间" )
    private Date createTime;

    @Schema(description = "订单号" )
    private String orderNumber;

    @TableField(exist = false)
    @Schema(description = "商品名称" )
    private String prodName;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "开始时间" )
    private Date startTime;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "结束时间" )
    private Date endTime;

    @TableField(exist = false)
    @Schema(description = "营销活动名称" )
    private String activityName;

    @Schema(description = "消息相关参数内容" )
    private String paramContent;

    @Schema(description = "短信模板code" )
    @TableField(exist = false)
    private String templateCode;

    @Schema(description = "公众号模板code" )
    @TableField(exist = false)
    private String mpCode;
}
